package com.haiyuancloud.auth._enum;


public class SysDsEnum {

    public enum I_VALUE_TYPE {
        NUM(1, "数字"),
        STR(2, "字符");
        private Integer value;

        private String name;

        I_VALUE_TYPE(Integer value, String name) {
            this.value = value;
            this.name = name;
        }

        public static I_VALUE_TYPE getEnum(Integer processType) {
            I_VALUE_TYPE[] types = values();
            for (int i = 0; i < types.length; i++) {
                if (types[i].getValue().intValue() == processType.intValue()) {
                    return types[i];
                }
            }
            /**抛异常**/
            return STR;
        }

        public Integer getValue() {
            return value;
        }

        public void setValue(Integer value) {
            this.value = value;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }


    public enum I_SYS_DS_SRC {
        MASTER(0, "主数据"),
        META(1, "元数据"),
        DEAL(2, "DAL数据"),
        UI(3, "UI数据"),
        ORG(4, "ORG数据"),
        PRD(5, "产品数据"),
        LOG(6, "日志数据"),
        STAT(7, "统计数据");
        private Integer value;

        private String name;

        I_SYS_DS_SRC(Integer value, String name) {
            this.value = value;
            this.name = name;
        }

        public static I_SYS_DS_SRC getEnum(Integer processType) {
            I_SYS_DS_SRC[] types = values();
            for (int i = 0; i < types.length; i++) {
                if (types[i].getValue().intValue() == processType.intValue()) {
                    return types[i];
                }
            }
            /**抛异常**/
            return MASTER;
        }

        public Integer getValue() {
            return value;
        }

        public void setValue(Integer value) {
            this.value = value;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }
}
